<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加单据信息</title>
<%@ include file="/WEB-INF/sys/include/css.jsp"%>
</head>
<body>
<form id="form" action="${path}/outRes/save.json" method="post">
<div class="form">
	<div class="group">
		<div class="label">单据编码:</div>
		<div class="item"><input type="text" name="dockeCode" id="dockeCode"/></div>
	</div>
	<div class="group">
		<div class="label">所在仓库:</div>
		<div class="item">
			<input type="text" id="name" name="name" />
			<input type="hidden" name="repertoryid" id="repertoryid" />
		</div>
		<div class="item" id="nameTip"></div>
	</div>
	<div class="group">
		<div class="label">发生日期:</div>
		<div class="item"><input type="text" name="happenTime" id="happenTime" ltype="date" /></div>
		<div class="text" style="width:93px;"><div id="happenTimeTip" class="text"></div></div>
	</div>
	<div class="group">
		<div class="label">经手人:</div>
		<div class="item"><input type="text" name="jingshou" id="jingshou"/></div>
	</div>
	<div class="group">
		<div class="label">备注:</div>
		<div class="item"><textarea id="remark" name="remark"></textarea></div>
	</div>
	<div class="group">
		<div class="label">领用单位:</div>
		<div class="item"><input type="text" name="caigou" id="caigou"/></div>
	</div>
	<div class="group">
		<div class="label">领用人员:</div>
		<div class="item"><input type="text" name="yanhuo" id="yanhuo"/></div>
	</div>
	<div class="buttons">
		<button class="highlight" id="submit1" type="button">确定</button>
		<button type="button" id="cancel1">取消</button>
	</div>
</div>
</form>
<%@ include file="/WEB-INF/sys/include/script.jsp" %>
<script type="text/javascript">
$(function() {
	createSelect("name", "repertoryid", {
		textField: 'text', valueField:'id',
		url:'${path}/repertory/getRepertoryData.json'
	});
	
	$("#form").ligerForm({inputWidth: 300});
	
	verifyForm("form", {}, function(){
		$("#form").ajaxForm(function(data){
			UiUtil.isSuccess(data, "添加单据信息成功", function(){
				UiUtil.closeForm(true);
			});
		});
	});
	
	$("#submit1").click(function(){
		UiUtil.lockButton('submit1');
		$("#form").submit();
	});

	$("#cancel1").click(function(){
		UiUtil.closeForm();
	});
	
});
</script>
</body>
</html>